import React from "react"
import childMenu from "../pages/menu1/childMenu";
import childMenu12 from "../pages/menu1/childMenu12";
import childMenu21 from "../pages/menu1/childMenu21";
import childMenu22 from "../pages/menu1/childMenu22";
import Nav from "../components/Nav/Nav";
// 给路由取别名 Router  哈希模式
import { HashRouter as Router, Route, Link,NavLink,Switch,Redirect } from 'react-router-dom'

const router = () => {
    return (
        <div>
            {/* <Router> */}
            {/* <Nav/> */}
            <Nav>
                <Route path='/childMenu1-1' component={childMenu} ></Route>
                <Route path='/childMenu1-2' component={childMenu12} ></Route>
                <Route path='/childMenu2-1' component={childMenu21} ></Route>
                <Route path='/childMenu2-2' component={childMenu22} ></Route>
            </Nav>
                
            {/* </Router> */}
        </div>
    );
};

export default router;